'use strict';

const BaseController = require('../sys/base');

class MonitorPartnersController extends BaseController {

  async add() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.add(ctx.request.body);
    this.success(result);
  }



  async list() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.list(ctx.request.query);
    this.success(result);
  }

  async delete() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.delete(ctx.query.id);
    this.success(result);
  }

  async update() {
    const { ctx } = this;
    const requestData = ctx.request.body;
    const result = await ctx.service.videos.monitorPartners.update(requestData);
    this.success(result);
  }

  async status() {
    const { ctx } = this;
    const requestData = ctx.request.body;
    const result = await ctx.service.videos.monitorPartners.status(requestData);
    this.success(result);
  }


  async hasUnusual() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.hasUnusual(ctx.request.query);
    this.success(result);
  }

  async datasPan() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.datasPan(ctx.request.query);
    this.success(result);
  }

  async dayData() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitorPartners.dayData(ctx.request.query);
    this.success(result);
  }



  async monitoring() {
    const { ctx } = this;
    const result = await ctx.service.videos.monitoringUnusual.monitoring(ctx.request.query);
    this.success(result);
  }

}

module.exports = MonitorPartnersController;
